package avicit.bdp.dcs.gp;

import java.sql.Connection;
import java.sql.DriverManager;

public class GpTest {
     private static String greenplum_driver = "org.postgresql.Driver";
     private static String greenplum_url = "jdbc:pivotal:greenplum://192.168.0.35:5432;databaseName=dbtest";
     private static String greenplum_user = "mds";
     private static String greenplum_password = "cape";


     public static Connection getGreenplumConnection() throws Exception {
         Class.forName("org.postgresql.Driver");
         Connection con = DriverManager.getConnection(greenplum_url, greenplum_user, greenplum_password);
         return con;
     }

    public static Connection getGreenplumConnection1() throws Exception {
        Class.forName("com.pivotal.jdbc.GreenplumDriver");
        Connection con = DriverManager.getConnection(greenplum_url, greenplum_user, greenplum_password);
        return con;
    }

     public static void main(String[] args) {
         try {
             Connection con = GpTest.getGreenplumConnection();
             System.out.println("con=" + con);
             Connection con1 = GpTest.getGreenplumConnection1();
             System.out.println("con1=" + con1);
         } catch (Exception e) {
             e.printStackTrace();
         }
     }
}
